home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / amiutils / i_l / irit5 / triv_lib / triv_dbg.c < prev    next >
C/C++ Source or Header  |  1995-12-30  |  2KB  |  43 lines

  1. /******************************************************************************
  2. * Triv_dbg.c - Provide a routine to print Trivariate objects to stderr.       *
  3. *******************************************************************************
  4. * Written by Gershon Elber, Dec. 94.                          *
  5. ******************************************************************************/
  6.  
  7. #include "triv_loc.h"
  8.  
  9. /*****************************************************************************
  10. * DESCRIPTION:                                                               M
  11. * Prints trivariates stderr. Should be linked to programs for debugging      M
  12. * purposes, so trivariates may be inspected from a debugger.                 M
  13. *                                                                            *
  14. * PARAMETERS:                                                                M
  15. *   Obj:       A trivariate - to be printed to stderr.               M
  16. *                                                                            *
  17. * RETURN VALUE:                                                              M
  18. *   void                                                                     M
  19. *                                                                            *
  20. * KEYWORDS:                                                                  M
  21. *   TrivDbg, debugging                                                       M
  22. *****************************************************************************/
  23. void TrivDbg(void *Obj)
  24. {
  25.     char *ErrorMsg;
  26.     TrivTVStruct
  27.     *TV = (TrivTVStruct *) Obj;
  28.     TrivGeomType 
  29.     GType = TV -> GType;
  30.  
  31.     switch (GType) {
  32.     case TRIV_TVBEZIER_TYPE:
  33.     case TRIV_TVBSPLINE_TYPE:
  34.         TrivTVWriteToFile3(TV, stderr, 0, "TrivDbg", &ErrorMsg);
  35.         break;
  36.     case TRIV_UNDEF_TYPE:
  37.         break;
  38.     }
  39.  
  40.     if (ErrorMsg)
  41.     fprintf(stderr, "TrivDbg Error: %s\n", ErrorMsg);
  42. }
  43.